<template>
  <div>
    <el-button class="t" type="primary" @click="dialogVisible = true">+ 新建</el-button>

    <el-dialog
      title="新增优惠卷"
      :visible.sync="dialogVisible"
      width="50%"
      :before-close="handleClose"
    >
      <el-form
        :label-position="labelPosition"
        label-width="100px"
        :model="formLabelAlign"
      >
        <el-form-item label="优惠卷名称">
          <el-select
            v-model="formDiscounts.name"
            placeholder="请选择"
            style="width: 100%;"
          >
            <el-option label="名称一" value="shanghai" />
            <el-option label="名称二" value="beijing" />
            >>>>>>> logincmw
            <el-form :label-position="labelPosition" label-width="100px" :model="formLabelAlign">

              <el-form-item label="优惠卷名称">
                <el-select v-model="formDiscounts.name" placeholder="请选择" style="width:100%">
                  <el-option label="名称一" value="shanghai" />
                  <el-option label="名称二" value="beijing" />
                  >>>>>>> development
                </el-select>
              </el-form-item>

              <el-form-item label="优惠卷金额">
                <el-input v-model="formDiscounts.discount_amount" placeholder="请选择" />
              </el-form-item>

              <el-form-item label="使用限制">
                <el-select v-model="formDiscounts.restrictions" placeholder="请选择" style="width:100%">
                  <el-option label="限制一" value="shanghai" />
                  <el-option label="限制二" value="beijing" />
                </el-select>
              </el-form-item>

              <el-form-item label="使用时效">
                <el-input v-model="formDiscounts.deadline" placeholder="请选择" />
              </el-form-item>

              <el-form-item label="账号领取限制">
                <el-input v-model="formDiscounts.get" placeholder="请选择" />
              </el-form-item>

            </el-form>

            =======
            <el-form :label-position="labelPosition" label-width="100px" :model="formLabelAlign">
              <el-form-item label="优惠卷名称">
                <el-select v-model="formDiscounts.name" placeholder="请选择" style="width:100%">
                  <el-option label="名称一" value="shanghai" />
                  <el-option label="名称二" value="beijing" />
                </el-select>
              </el-form-item>

              <el-form-item label="优惠卷金额">
                <el-input v-model="formDiscounts.discount_amount" placeholder="请选择" />
              </el-form-item>

              <el-form-item label="使用限制">
                <el-select v-model="formDiscounts.restrictions" placeholder="请选择" style="width:100%">
                  <el-option label="限制一" value="shanghai" />
                  <el-option label="限制二" value="beijing" />
                </el-select>
              </el-form-item>

              <el-form-item label="使用时效">
                <el-input v-model="formDiscounts.deadline" placeholder="请选择" />
              </el-form-item>

              <el-form-item label="账号领取限制">
                <el-input v-model="formDiscounts.get" placeholder="请选择" />
              </el-form-item>
            </el-form>

            >>>>>>> development
            <span slot="footer" class="dialog-footer">
              <el-button @click="dialogVisible = false">取 消</el-button>
              <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
            </span>
          </el-select></el-form-item></el-form></el-form-item></el-select></el-dialog>
  </div>
</template>

<script>
export default {
  name: 'New',
  data() {
    return {
      dialogVisible: false,
      formDiscounts: {
        name: '',
        discount_amount: '',
        restrictions: '',
        deadline: '',
        get: '',
      },
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
  },
};
</script>

<style>
.t {
  margin-left: 1%;
}
</style>
